home *** CD-ROM | disk | FTP | other *** search
- {By Skynet....From Vulkanus
- "My computer, My hero, My God, My I"
-
- Crec en la vostra comprensio...}
-
- Program Ta_Mare_No_Te_Coll;
-
- Uses Crt,Grflib;
-
- Const ESTEL=500;
-
- Type estels=Array[1..ESTEL] of word;
-
- Var X,Y,Z :Estels;
- Car :Char;
- PV :Byte;
- a,b :Integer;
-
- Const DIST:Integer=1024;
-
- Procedure GoStar(MW:Word); Forward;
-
- Procedure Putpixel3D(Xc,Yc,Zc,orx,ory:Integer; Color:Byte; SE,Index:Word);
- Var RX,RY:Integer;
- begin
- if zc<1 then zc:=1;
- RX:=(Xc*dist div (zc+1))+orx;
- RY:=(Yc*dist div (zc+1))+ory;
- if ((rx>0) and (rx<319)) AND ((ry>0) and (ry<199)) then
- fponpixel(rx,ry,color,pv)
- Else
- GoStar(Index);
- End;
-
- Procedure Initstars;
- Var i:Integer;
- Begin
- for i:=1 to ESTEL do
- Begin
- X[i]:=Random(319) +1;
- Y[i]:=Random(199) +1;
- Z[i]:=Random(Dist)+1;
- End;
- End;
-
- Procedure PutStars(Se:Word;orx,ory:integer);
- Var I:Integer;
- Begin
- For I:=1 to ESTEL do
- Begin
- If Z[i]<500 then
- PutPixel3D(X[i],Y[i],Z[i],orx,ory,15,se,i)
- else
- Putpixel3D(X[i],Y[i],Z[i],orx,ory,8,se,i);
- Z[i]:=Z[i]-2;
- End;
- End;
-
- Procedure GoStar(MW:Word);
- Var I:Integer;
- Begin
- X[mW]:=Random(318)+1;
- Y[mW]:=Random(198)+1;
- Z[mW]:=Random(Dist);
- End;
-
-
- BEGIN
- Modografico;
- borrapantalla(0,0);
- PV:=CreaVirtual;
- Initstars;
- Car:=#0;
- a:=160;
- b:=100;
- Repeat
- fborrapantalla(0,pv);
- putstars(pv,a,b);
- copiapantalla(pv,0);
- Until keypressed;
- Modotexto;
- END.
-